package com.example.designModel.agency.agency01;

import java.io.Console;

/**
 * XXXXXXXXX
 *
 * @author brad zhang
 * @version 2.0
 * @date 2021/11/17 16:27
 */
public class Program {

    public static void main(String[] args) {
        SchoolGirl jiaojiao = new SchoolGirl();
        jiaojiao.nameP = "李娇娇";
        Pursuit zhuojiayi = new Pursuit(jiaojiao);
        zhuojiayi.GiveDolls();
        zhuojiayi.GiveFlowers();
        zhuojiayi.GiveChocolate();

    }

    //追求者
    static class Pursuit {

        SchoolGirl mm;

        public Pursuit(SchoolGirl mm) {
            this.mm = mm;
        }

        public void GiveDolls() {
            System.out.println(mm.nameP + " 送你洋娃娃");
        }

        public void GiveFlowers() {
            System.out.println(mm.nameP + " 送你鲜花");
        }

        public void GiveChocolate() {
            System.out.println(mm.nameP + " 送你巧克力");
        }
    }

    //被追求者
    static class SchoolGirl {

        private String name;
        public String nameP;

        public String getNameP() {
            return name;
        }

        public void setNameP(String nameP) {
            this.name = nameP;
        }
    }
}
